import baseAxios from "axios"


export function request(config) { 
    const axios=baseAxios.create({
        baseURL: "http://127.0.0.1:8888/api/private/v1/",
        timeout: 500,
    })

    axios(config).then(res => {
        
    }).catch(err => {
        console.log(err)
    })

    axios.interceptors.request.use(req => {
        // console.log(req)
        // console.log(window.sessionStorage.getItem("token"))
        req.headers.Authorization = window.sessionStorage.getItem("token");
        return req
    })

    return axios(config)
 }